package com.team5101.web.controller;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.alibaba.dubbo.qos.server.Server;
import com.github.tobato.fastdfs.FdfsClientConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@EnableDubbo
@Import(FdfsClientConfig.class)
public class ShopTeam5101ProductWebControllerApplication {

    public static void main(String[] args) {
        //由于在单机上启动多个springboot应用实例，解决方法在启动类中关闭QOS服务：
        //配置dubbo.qos.port端口
        System.setProperty(Constants.QOS_PORT,"33333");
//        //配置dubbo.qos.accept.foreign.ip是否关闭远程连接
        System.setProperty(Constants.ACCEPT_FOREIGN_IP,"false");
        SpringApplication.run(ShopTeam5101ProductWebControllerApplication.class, args);
        //关闭QOS服务
        Server.getInstance().stop();
    }

}
